
import Layout from '@/views/layout/index'

const moduleRouter = {
    path: '/module',
    component: Layout,
    name: 'module',
    meta: {
        title: '模型管理',
        icon: 'iconfont icon-moban'
    },
    redirect: "/module/manage",
    children: [{
        path: 'manage',
        name: 'moduleManage',
        component: () => import('@/views/module/manage'),
        meta: {
            title: '模型管理',
            icon: 'iconfont icon-moban',
            api: ['module'],
            authority: ['list'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            }]
    },{
        path: 'group',
        name: 'moduleGroup',
        component: () => import('@/views/module/moduleGroup'),
        hidden: true,
        meta: {
            title: '模型组',
            api: ['module_group'],
            authority: ['list','create','edit','details'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            }]
    },{
        path: 'fields',
        name: 'moduleFields',
        component: () => import('@/views/module/moduleFields'),
        hidden: true,
        meta: {
            title: '模型字段',
            api: ['module_fields'],
            authority: ['list','create','edit','details'],
        },
        checkedList: [],
        rights: [{
                value: 'list',
                label: '列表'
            },{
                value: 'create',
                label: '添加'
            },{
                value: 'details',
                label: '详情'
            },{
                value: 'edit',
                label: '编辑'
            },{
                value: 'delete',
                label: '删除'
            }]
    }]
}

export default moduleRouter